<template>
	<view style="width: 100%;">
		<view class="input_view">
			<input class="input" :placeholder="cnObj.oldtip" v-model="oldpwd"/>
		</view>
		<view class="input_view">
			<input class="input" :placeholder="cnObj.new1tip" v-model="newpwd1"/>
		</view>
		<view style="padding: 0 10px; width:calc(100% - 20px);" >
			<button type="primary" style="background-color: ##007AFF;color: #fff;border: none;" @click="submitpwd">{{cnObj.submittitle}}</button>
		</view>
	</view>
</template>

<script>
	var util = require("../../utils/util.js");
	var infolistutil = require("../../utils/infolistutil.js");
	var common = require("../../utils/api/common.js")
	const app = getApp().globalData;
	export default {
		data() {
			return {
				oldpwd:'',
				newpwd1:'',
				enObj:{'oldtip':'Your Broadcast Action','new1tip':'Your foreground flag','submittitle':'Ensure'},
				cnObj:{'oldtip':'请输入广播动作','new1tip':'请输入广播扫码结果标签输出','submittitle':'确定'}
				
			}
		},
		
		onLoad:function(options){
			let i18n = uni.getStorageSync('i18n')
			if(i18n === 'en'){
				this.cnObj = this.enObj
				uni.setNavigationBarTitle({title:'Broadcast Setting'})
			}
		},
		
		methods:{
			submitpwd(){
				var that = this
				uni.setStorageSync('pdaAction',oldpwd)
				uni.setStorageSync('pdaExtra',newpwd1)
				uni.navigateBack({delta:1})
			}
		}
	}
</script>

<style>
	.input_view{margin: 10px;padding: 5px 10px;border: 1px solid #D9D9D9;width:calc(100vw - 40px);border-radius: 5px;}
	.input{outline-color: invert;flex:1; outline-style: none;outline-width: 0px;border: none;border-style: none;text-shadow: none; -webkit-appearance: none;-webkit-user-select: text;outline-color: transparent;box-shadow: none;outline: none;border-radius: 0;}
</style>
